package com.support.android.myapp3.acitivty;

import android.os.Bundle;
import android.support.design.widget.NavigationView;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

import com.support.android.myapp3.R;
import com.support.android.myapp3.fragment.MainFragment;
import com.support.android.myapp3.fragment.PriceCalcFragment;
import com.support.android.myapp3.fragment.Tab2Fragment;
import com.support.android.myapp3.fragment.TabFragment;
import com.support.android.myapp3.fragment.TaxFragment;
import com.support.android.myapp3.fragment.TestFragment;

public class Main2Activity extends AppCompatActivity  {



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar2);
        setSupportActionBar(toolbar);
        getSupportActionBar().setHomeButtonEnabled(true);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        this.getSupportActionBar().setDisplayShowTitleEnabled(false);


    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            finish();
        }
        return super.onOptionsItemSelected(item);
    }

    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
//        outState.putCharSequence("keyindex", currentFragmentStr);
    }

    @Override
    public void onBackPressed() {

            super.onBackPressed();

    }


}
